<?php
namespace App\Http\Controllers;

use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class LoginController extends Controller
{
    public function index(Request $request)
    {

    	$request->session()->put('name', 'xuebingsi');
    	// $users = DB::select('select * from fly_user');

    	// var_dump($users);

    	// DB::insert('insert into users (id, name) values (?, ?)', [1, '学院君']);

    	// $affected = DB::update('update users set votes = 100 where name = ?', ['学院君']);
    	// $user = new User();
    	// 
    	// $users = User::all();
    	// 
    	$users = User::find(5);

    	var_dump($users);

    	// $user->get_top();

    	// $users = DB::table('fly_user')->where(['uid'=>5])->first();

    	// var_dump($users);
    	

    	return view('welcome',['name'=>'sdfjlsdkjfsldkf ']);
    }
}
